#include "engines/game_engine.h"
#include "engines/graphics_engine.h"

game::game()
{
   gfx = new graphics_engine(this);
   g = new game_engine(this);
   g->attach_graphics_engine(gfx);
   gfx->attach_game_engine(g);
   isRunning = true;
}

void game::run()
{
   while(isRunning)
   {
      g->frame();
      gfx->frame();
   }
}

void game::stop()
{
   isRunning = false;
}

game::~game()
{
   delete g;
   delete gfx;
}
